#include <stdio.h>

int fun(int a[], int n)
{
	int i, j, k, sum;
	sum = 0;
	for (i = 0; i < n; i++)
	{
		k = a[i] / 2;
		/**********found**********/
		for (j = 2; j <= k; j++)
		{
			if (a[i] % j == 0)
				/**********found**********/
				break;
		}
		/**********found**********/
		if (j <= k)
			sum += a[i];
	}
	return sum;
}
int main()
{
	int a[12] = { 22,3,65,37,18,19,10,11,12,23,15,17 };
	printf("sum=%d\n", fun(a, 12));
	return 0;
}
